a11y: Cast g_object_ref() to the right type
authorEmmanuele Bassi <ebassi@gnome.org>
Sun, 11 Feb 2018 15:01:43 +0000 (15:01 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 11 Feb 2018 23:28:50 +0000 (23:28 +0000)
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.

gtk/a11y/gtklabelaccessible.c
gtk/a11y/gtktreeviewaccessible.c

index add0861f93743b1aa363c1f751b4cffb944aa023..29cd58ece8f679fbf936047d71b1b98fb93323e3 100644 (file)
@@ -84,7 +84,7 @@ gtk_label_accessible_link_impl_get_hyperlink (AtkHyperlinkImpl *atk_impl)
 {
   GtkLabelAccessibleLinkImpl *impl = (GtkLabelAccessibleLinkImpl *)atk_impl;
 
-  return g_object_ref (impl->link);
+  return ATK_HYPERLINK (g_object_ref (impl->link));
 }
 
 static void
index 095a700b7dc0bd0e90eacd3c59a254f61867d6b8..efb9c9bc533c6f80ed0660051bc8e1436c662186 100644 (file)
@@ -469,7 +469,7 @@ gtk_tree_view_accessible_ref_child (AtkObject *obj,
   if (cell == NULL)
     cell = create_cell (tree_view, accessible, tree, node, tv_col);
 
-  return g_object_ref (cell);
+  return ATK_OBJECT (g_object_ref (cell));
 }
 
 static AtkStateSet*
@@ -562,7 +562,7 @@ gtk_tree_view_accessible_ref_accessible_at_point (AtkComponent *component,
   if (cell == NULL)
     cell = create_cell (tree_view, GTK_TREE_VIEW_ACCESSIBLE (component), tree, node, column);
 
-  return g_object_ref (cell);
+  return ATK_OBJECT (g_object_ref (cell));
 }
 
 static void